package com.sanyu.controller.admin;

import com.sanyu.pojo.dto.RepairmanDTO;
import com.sanyu.pojo.dto.UserDTO;
import com.sanyu.pojo.dto.UserPageQueryDTO;
import com.sanyu.pojo.vo.UserVO;
import com.sanyu.result.PageResult;
import com.sanyu.result.Result;
import io.swagger.annotations.Api;
import io.swagger.annotations.ApiOperation;
import org.springframework.web.bind.annotation.*;

@RestController
@RequestMapping("/admin/user")
@Api("后台管理页面/管理学生用户账户相关接口")
public class UserController {

    @GetMapping("/{id}")
    @ApiOperation("获取指定ID学生用户详细信息")
    public Result<UserVO> detail(){
        return Result.success(new UserVO());
    }

    @GetMapping("/page")
    @ApiOperation("学生用户分页查询")
    public PageResult page(UserPageQueryDTO userPageQueryDTO){
        return new PageResult();
    }

    @PutMapping
    @ApiOperation("修改用户信息")
    public Result update(@RequestBody UserDTO userDTO){
        return Result.success();
    }

    @PutMapping("/password/{id}")
    @ApiOperation("修改密码")
    public Result updatePwd(@PathVariable Long id, String newPassword){
        return Result.success();
    }
}
